package com.eobard.controller;


import com.eobard.entity.User;
import com.eobard.service.UserService;
import com.eobard.utils.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/api/user")
public class UserController {

    @Resource
    private UserService userService;

    @GetMapping("/get")
    public Result result(){
        List<User> users = userService.list();
        return Result.ok(users);
    }

}

